

import UIKit

class readprojectViewController: UIViewController
{

    @IBOutlet weak var projecttitle: UILabel!
    @IBOutlet weak var webview:UIWebView!
    var projectinfo:resourcejson? = nil
    func Alarm()
    {
        let alarm=UIAlertController(title: "提示", message: "收藏，关注功能尚未上线", preferredStyle: .alert)
        alarm.addAction(UIAlertAction(title: "好", style: .cancel, handler: nil))
        self.present(alarm, animated: true, completion: nil)
    }


    override func viewDidLoad()
    {
        super.viewDidLoad()
        self.navigationController?.navigationBar.tintColor=UIColor.white
        self.navigationController?.navigationItem.leftBarButtonItem?.title="返回"
        self.navigationItem.rightBarButtonItem=UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(Alarm))
        projecttitle.text = projectinfo?.name
        let surl:String = "http://amicool.neusoft.edu.cn/project.php/show/index/id/" + projectinfo!.id!
        let url = URL(string: (surl+".html"))
        webview.loadRequest(URLRequest(url: url!))
        //webview.loadHTMLString((projectinfo?.content)!, baseURL: nil)
        // Do any additional setup after loading the view.
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
